package com.deviche.view;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.BottomNavigationView;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;

import com.deviche.library.utils.ToastUtils;

/**
 * 仿饿了么交互
 */
public class EleActivity extends AppCompatActivity {


    BottomNavigationView bottomNavigationView;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_ele);

        bottomNavigationView = findViewById(R.id.bottom_tab);

        bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
            @Override
            public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
//                jumpToFragment(menuItem.getItemId());
                return true;
            }
        });


    }

//    public void jumpToFragment(int itemId) {
//        switch (itemId) {
//            case R.id.waimai1:
//                ToastUtils.showToast(this,"第一个fragment");
//                break;
//
//            case R.id.waimai2:
//
//                break;
//            case R.id.waimai3:
//
//                break;
//            case R.id.waimai4:
//
//                break;
//
//            default:
//                break;
//        }
//    }
}
